import Login from '../pages/Login';
// import HomePages from '../pages/index';
import LargeSize from '../pages/LargeSize';
import Regular from '../pages/member/regular'
import Silver from '../pages/member/silver'
import Gold from '../pages/member/gold'
import Exceptions  from '../pages/Exception/404'
import { RouteConfig } from './types';
// 全局路由配置（包含登录、业务、404路由）
export const baseRoutes: RouteConfig[] = [
    {
        path: '/login',
        title: '登录',
        component: Login,
        hidden: true, // 不在侧边栏显示
        requireAuth: false, // 登录页无需权限
        key: 'login',
    },
    {
        path: '/largeSize',
        title: '可视化大屏',
        component: LargeSize,
        key: 'largeSize',
    },
    {
        path: '/member',
        title: '会员',
        key: 'member',
        items: [
            {
                path: '/member/regular',
                title: '普通',
                component: Regular,
                key: 'member-regular',
            },
            {
                path: '/member/silver',
                title: '白银',
                component: Silver,
                key: 'member-silver',
            },
            {
                path: '/member/gold',
                title: '黄金',
                component: Gold,
                key: 'member-gold',
            },
        ],
    },
    {
        path: '/404',
        title: '404',
        component: Exceptions,
        hidden: true, // 不在侧边栏显示
        key: '404',
    },
];

// 侧边栏路由配置（过滤hidden: true的路由）
export const SidebarConfig = baseRoutes.filter((route) => !route.hidden);

export default baseRoutes;
